<style>
#artikli_tipovi table tr:hover{
	background:{{$highlight}};
	color:{{$highlighttext}};
}
#artikli_tipovi table td input[type=button]{
	width:16px;
	height:16px;
	padding:0px;
	background-color:transparent;
	border:none;
	margin:0px 2px;
	cursor:pointer;
}
#artikli_tipovi table td input[type=button]:hover{
	background-color:#fff;
}
</style>
<div class="area" id="artikli_tipovi">
	<h2>Tipovi artikala</h2>
	<input type="button" class="refresh" value="osveži" onclick="LoadRSDoc('artikli.php?a=artikli_tipovi','setContent')" />
	<input type="button" class="novi" value="novi tip" onclick="var nn=trim(prompt('Naziv tipa:')); if(nn.length){LoadRSDoc('artikli.php?a=artikli_tipovi&mod=save&name='+escape(nn),'afterSaveArtiklGroup(\'artikli_tipovi\')')}" /><br clear="all" />
	<table>
		<tr class="head">
			<td>šifra</td>
			<td>naziv</td>
			<td></td>
		</tr>
		{{%loop start type_id}}
		<tr>
			<td>{{$type_id}}</td>
			<td>{{$type_name}}</td>
			<td>
				<input title="izmeni" type="button" class="edit" onclick="var nn=trim(prompt('Novi naziv za tip #{{$type_id}}&nbsp({{$type_name}})','{{$type_name}}')); if(nn.length){LoadRSDoc('artikli.php?a=artikli_tipovi&mod=save&id={{$type_id}}&name='+escape(nn),'afterSaveArtiklGroup(\'artikli_tipovi\')')}" />
				<input title="obriši" type="button" class="delete" onclick="if({{$type_id}}>0 && confirm('Da li želite da obrišete tip \'{{$type_name}}\'?')){LoadRSDoc('artikli.php?a=artikli_tipovi&mod=delete&id={{$type_id}}','afterSaveArtiklGroup(\'artikli_tipovi\')')}" />
			</td>
		</tr>
		{{%loop end}}
	</table>
</div>